<template>
    <div class="hlep-box">
        <div v-html="helpHtml"></div>
    </div>
</template>
<script>
import api from '@/api/api.js' 
export default {
    data () {
        return { 
            helpHtml:''
        }
    },
    created(){

    },
    beforeRouteEnter(to, from, next) {
        next(vm=>{ 
            vm.getHtml(from.name);

        })
    }, 
    methods:{
        getHtml(name){
            let pageName = name == 'Entirety' ? 'index': name == 'My' ? 'my' : 'statistics';
            api.publick.getHlepHtml({
                pageName:pageName
            },res=>{
                this.helpHtml=res.result.pageHelp
            })
        }
    }
}
</script>
